package com.project.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the RoomForRent database table.
 * 
 */
@Entity
@Table(name="RoomForRent")
@NamedQueries({
	@NamedQuery(name = "RoomForRent.findAllRoomForRent", query = "select pro from RoomForRent pro"),
	@NamedQuery(name="RoomForRent.searchRoomForRent",query="select pro from RoomForRent pro where (:title is null or pro.property.title like :title) and (:address is null or pro.property.address like :address) and (pro.deposit between :depositMin and :depositMax) and (pro.rent between :rentMin and :rentMax)")
})
public class RoomForRent implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PropID")
	private String propID;

	@Column(name="Deposit")
	private double deposit;

	@Column(name="Rent")
	private double rent;

	//bi-directional one-to-one association to Property
	@OneToOne
	@JoinColumn(name="PropID")
	private Property property;

    public RoomForRent() {
    }

	public String getPropID() {
		return this.propID;
	}

	public void setPropID(String propID) {
		this.propID = propID;
	}

	public double getDeposit() {
		return this.deposit;
	}

	public void setDeposit(double deposit) {
		this.deposit = deposit;
	}

	public double getRent() {
		return this.rent;
	}

	public void setRent(double rent) {
		this.rent = rent;
	}

	public Property getProperty() {
		return this.property;
	}

	public void setProperty(Property property) {
		this.property = property;
	}
	
}